#include "frameless.h"
#include "ui_frameless.h"

FrameLess::FrameLess(QWidget* parent)
    : QWidget(parent)
    , ui(new Ui::FrameLess)
{
    ui->setupUi(this);
    connect(ui->pushButton, &QPushButton::clicked, this, [=]() {
        static bool set = false;
        setWindowFlag(Qt::FramelessWindowHint, set);
        set = !set;
    });
}

FrameLess::~FrameLess()
{
    delete ui;
}
